Log-likelihood ratio test for equality of one covariance matrix.
equal.cov(x, Sigma, a = 0.05)
A vector with the the test statistic, the p-value, the degrees of freedom and the critical value of the test.
A matrix containing Euclidean data.
The hypothesis covariance matrix.
The significance level, set to 0.05 by default.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
The hypothesis test is that the the sample covariance is equal to some specified covariance matrix:
Mardia K.V., Kent J.T. and Bibby J.M. (1979). Multivariate Analysis. London: Academic Press.
likel.cov, Mtest.cov
x <- as.matrix( iris[, 1:4] )
s <- cov(x) * 1.5
equal.cov(x, s)
Run the code above in your browser using DataLab